import services
from services import BasicService

class AddService(BasicService):
    def __init__(self):
        BasicService.__init__(self)

    def process_command(self, command, args):
        if command == "add":
            num1 = args[0]
            num2 = args[1]
            return num1 + num2
        return "null"

    def add(self, num1, num2):
        return self.execute("add",(num1, num2))

if __name__ == "__main__":
    add_service = AddService()
    services.launch_service(add_service, "addservice")
